package com.study.web.dao.sysuser.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.study.common.base.dao.BaseDaoImpl;
import com.study.web.dao.sysuser.SysUserDao;
import com.study.web.entity.SysUser;

/**
 * SysUserDaoImpl.java
 * 
 * @author yaojinshan
 * @since 2018年6月11日上午11:13:07
 */
@Repository("sysUserDao")
public class SysUserDaoImpl extends BaseDaoImpl<SysUser>implements SysUserDao {

	/**
	 * 根据条件获取系统用户
	 *
	 * @param sysUser
	 */
	public SysUser getSystemUserByExmaple(SysUser sysUser) {
		String sqlId = "getSystemUserByExmaple";
		List<SysUser> list = getSessionTemplate().selectList(sqlId, sysUser);
		if (list != null && list.size() > 0) {
			return list.get(0);
		}
		return null;

	}

	public Long batchUpdateSysUserStatus(Map<String, Object> paramMap) {
		return (long) getSessionTemplate().update("batchUpdateSysUserStatus",paramMap);
	}

}
